]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
NetworkAgent: Fix double-unref in get_secrets_keyring_cb()
authorChristophe Fergeau <cfergeau@redhat.com>
Sun, 20 Dec 2015 19:51:52 +0000 (20:51 +0100)
committerChristophe Fergeau <cfergeau@redhat.com>
Thu, 7 Jan 2016 14:27:42 +0000 (15:27 +0100)
In get_secrets_keyring_cb, we own a ref on the 'attributes' hash table
from secret_item_get_attributes), and a ref on the 'secret' object (from
secret_item_get_secret(), but in the SHELL_KEYRING_SK_TAG case, we unref
these once before breaking out of the loop, and the second time after
breaking out of the loop.

https://bugzilla.gnome.org/show_bug.cgi?id=759708

src/shell-network-agent.c

index 5d991673dbf5cf90853b80a3d6ee4861e443ab8f..da0f7e55133192c9b3f31f49b308ddc275becaac 100644 (file)
@@ -314,8 +314,6 @@ get_secrets_keyring_cb (GObject            *source,
 
               secrets_found = TRUE;
 
-              g_hash_table_unref (attributes);
-              secret_value_unref (secret);
               break;
             }
         }